package github.kawaiior.yuanchuxiuzhen.common.gongfa;

import github.kawaiior.yuanchuxiuzhen.Yuanchuxiuzhen;
import github.kawaiior.yuanchuxiuzhen.common.capability.entity.ManaPower;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;

public interface IGongFa {
    void onPlayerLearn(PlayerEntity player, World world, ManaPower power);
    void onPlayerLearnFinish(PlayerEntity player, World world, ManaPower power);
    ManaPower.ManaRoot getManaRoot();

    IGongFa getPreGongFa();

    int getMaxExperience();

    default String getItemName(){
        return "item."+ Yuanchuxiuzhen.MODID+".undefine";
    }

    default void sendLearningMessage(PlayerEntity player){
        player.sendMessage(new TranslationTextComponent("gongfa.yuanchuxiuzhen.start",
                new TranslationTextComponent(this.getItemName())), player.getUniqueID());
    }

    default void sendLearnedMessage(PlayerEntity player){
        player.sendMessage(new TranslationTextComponent("gongfa.yuanchuxiuzhen.finish",
                new TranslationTextComponent(this.getItemName())), player.getUniqueID());
    }

}
